//
//  WGALertLoginView.m
//  QuickCure1
//
//  Created by Apple on 16/11/6.
//  Copyright © 2016年 maoge. All rights reserved.
//

#import "WGALertLoginView.h"

@interface WGALertLoginView ()
@property (weak, nonatomic) IBOutlet UIView *v_middle;
@property (weak, nonatomic) IBOutlet UIButton *okButton;

@end

@implementation WGALertLoginView

-(void)awakeFromNib{
    [super awakeFromNib];
    self.okButton.layer.cornerRadius = 5;
    self.okButton.layer.masksToBounds = YES;
    
    self.v_middle.layer.cornerRadius = 10;
    //设置动画
    
    CAKeyframeAnimation *key = [CAKeyframeAnimation animationWithKeyPath:@"transform.rotation"];
    
    key.values = @[@(- M_PI_4 * 0.1),@(M_PI_4 * 0.1),@(- M_PI_4 * 0.1)];
    
    key.repeatCount = CGFLOAT_MAX;
    
    key.duration = 0.5;
    
    [self.layer addAnimation:key forKey:nil];
    
   
    
    
}

+(instancetype)alertLoginView{
    
    
    
    return [[[NSBundle mainBundle]loadNibNamed:@"WGALertLoginView" owner:nil options:nil]lastObject];
    
    
    
}
- (IBAction)login:(id)sender {
    
    if (_AlertLoginBlock) {
        
        _AlertLoginBlock();
    }
 
}


@end
